<form action="vote.manage.php" id="form_add" name="form_add" method="post">
	<input type="hidden" name="action" value="save" />
    <table class="from_table">
		<tr>
			<th class="th3"><tpl> $langVoteLTitle </tpl>：</th>
			<td width="530" class="td1"><input name="txttitle" type="text" id="txttitle" class="txtinput" size="50" />
			<label style="display:none" for="txttitle" class="wrong" metaDone="true" generated="true"></label>			</td>
		</tr>
		<tr>
			<th class="th3"><tpl> $langVoteOption </tpl><br />
			  <tpl> $langVoteLFillInOneOption </tpl><br /><tpl> $langVoteLRepeatOptionNoteOnce </tpl><br /><tpl> $langVoteLMostFillInTenOption </tpl><br /><tpl> $langVoteLForbidIncludeChar </tpl></th>
			<td width="530" class="td1"><textarea name="txtcontent" cols="56" rows="5" id="txtcontent" class="tarea"></textarea>
			<label style="display:none" for="txtcontent" class="wrong" metaDone="true" generated="true"></label>			</td>
		</tr>
		<tr>
			<th class="th3"> <tpl> $langVoteLIfRepeat </tpl>：</th>
			<td width="530" class="td1"><input type="radio" name="txtrefresh" value="0" checked="checked" /><tpl> $langCNo </tpl>
				<input type="radio" name="txtrefresh" value="1" /><tpl> $langCYes </tpl>			</td>
		</tr>
		<tr>
			<th class="th3"> <tpl> $langVoteLIfMemberCan </tpl>：</th>
			<td width="530" class="td1"><input type="radio" name="txtmember" value="0" checked="checked" /><tpl> $langCNo </tpl>
				<input type="radio" name="txtmember" value="1" /><tpl> $langCYes </tpl>			</td>
		</tr>
		<tr>
			<th class="th3"> <tpl> $langVoteLIfManySelect </tpl>：</th>
			<td width="530" class="td1"><input type="radio" name="txtcheck" value="0" checked="checked" /><tpl> $langCNo </tpl>
				<input type="radio" name="txtcheck" value="1" /><tpl> $langCYes </tpl>			</td>
		</tr>
		<tr>
			<th class="th3"> <tpl> $langVoteLHomeDisTime </tpl>：</th>
			<td width="530" class="td1"><input type="text" name="s_date" id="s_date" style="border:solid 1px #B0DF82;cursor:pointer; width:100px; background:url(../js/calendar/blue/cal_btn.gif) no-repeat right; height:18px; padding-right:19px;" readonly="readonly" /> <tpl> $langVoteLTo </tpl>
  	    		<input type="text" name="e_date" id="e_date" style="border:solid 1px #B0DF82;cursor:pointer; width:100px; background:url(../js/calendar/blue/cal_btn.gif) no-repeat right; height:18px; padding-right:19px; " readonly="readonly" />			</td>
		</tr>
		<tr>
			<th class="th3"> <tpl> $langVoteLHomeDisPlace </tpl>：</td>
			<td width="530" class="td1"><tpl> foreach from=$show_name key=key item=one </tpl>
					<input name="show_name[]" type="checkbox" value="<tpl> $key </tpl>" /><tpl> $one </tpl>
				<tpl> /foreach </tpl>			</td>
		</tr>
		
  </table>
  <div class="table-5-bottom"><div class="p-left-2"><span class="btn_left">
		  <input type="submit" class="btn_submit" name="Submit" value="<tpl> $langVoteLSubmit </tpl>" /></span></div></div>
</form>
<script>
$(document).ready(function() {
	
	//添加
	var options = {
		beforeSubmit:  function(){showLoading(showSaveText);},
		success:       function(msg){
							hideLoading();
							showMessage(msg.message,msg.type);
							if(msg.type == '1'){
								ST(0,0);
								ShowDiv	= 'result_content';
								getPageContent("vote.manage.php?action=ajax_list");
							}
						},
		type:      'post',
		dataType:  'json'
	};
	
	//对添加表单做的验证定义
	$("#form_add").validate({
		errorClass: "wrong",
		rules: {
			txttitle: {required:true},
			txtcontent: {required:true}
		},
		messages: {
			txttitle: {required:"<tpl> $langVoteLTopicNotNull </tpl>"},
			txtcontent: {required:"<tpl> $langVoteLOptionNotNull </tpl>"}
		},
		submitHandler: function() {
			$('#form_add').ajaxSubmit(options);
		}
	});
});
//时间
$(function(){
   $("#s_date").datepicker();
   $("#e_date").datepicker();
})
</script>